# 1.read_csv()：从CSV文件加载数据
import pandas as pd
import numpy as np

df1 = pd.read_excel("resources/字段映射.xlsx")
# 构建字典
data_dict1 = dict(zip(df1["IMIX2.0域号"], df1["数据项"]))
# print(data_dict1)

df2 = pd.read_excel("resources/报文.xlsx")
data_dict2 = dict(zip(df2["CSTP域号"], df2["数据项编号"]))
# print(data_dict2)

# print('字段映射'+str(len(data_dict1.keys())))
# print('报文'+str(len(data_dict2.keys())))

# for i in data_dict2.keys():
#     if i in data_dict1.keys():
#         if data_dict2[i] == data_dict1[i]:
#             continue
#         else:
#             baowen_data = data_dict2[i]
#             ziduan_data = data_dict1[i]
#             print(f"{i}：报文 - {data_dict2[i]}, 字段映射 - {data_dict1[i]}")
#             # print(i+'：报文-'+str(baowen_data)+',字段-'+str(ziduan_data))
#     else:
#         # print(i+"在字段映射中没有")
#         print(f"{i} 在字段映射中没有")


